<!--{include admin_header}-->
                <div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

<!--{include admin_breadcrumb}-->
						<div class="nav-search" id="nav-search">
							<form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="icon-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- #nav-search -->
					</div>

					<div class="page-content">
						<div class="page-header">
							<h1>{$_G['admincp']['actname']}<small><i class="icon-double-angle-right"></i>{$_G['admincp']['optname']}</small></h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="row">
                                    <div class="col-sm-6">
										<div class="dd" id="nestable">
											<ol class="dd-list">
<!--{loop $teams $k $v}-->
												<li class="dd-item dd2-item" data-id="{$v['id']}">
													<div class="dd-handle dd2-handle"><i class="normal-icon icon-time pink bigger-130"></i></div>
													<div class="dd2-content">{$v['name']}</div>
													<ol class="dd-list">
<!--{loop $v['tasks'] $tk $tv}-->
														<li class="dd-item item-orange" data-id="{$tv['id']}">
															<div class="dd-handle">
                                                            {$tv['name']}<div class="easy-pie-chart percentage" data-percent="{$tv['percent']}" data-color="#87B87F" data-rel="tooltip" title="{$tv['percent']}%"></div>


                                                                <span class="sticker hide">
                                                                    <span class="label label-success arrowed-in">
                                                                        <i class="icon-ok bigger-110"></i>
                                                                    </span>
                                                                </span>
                                                                <div class="pull-right action-buttons">
																	<a class="blue" href="#">
																		<i class="icon-pencil bigger-130"></i>
																	</a>

																	<a class="red" href="#">
																		<i class="icon-trash bigger-130"></i>
																	</a>
                                                                    <a data-rel="tooltip" data-placement="left" title="${date('Y-m-d', $tv['begin_time'])} - ${date('Y-m-d', $tv['end_time'])}" href="#" class="badge badge-primary radius-5 tooltip-info white no-hover-underline">
                                                                        <i class="bigger-120 icon-calendar"></i>
                                                                    </a>
																</div>
															</div>
														</li>
<!--{/loop}-->
													</ol>
												</li>
<!--{/loop}-->
											</ol>
										</div>
									</div>

									<div class="col-sm-6">
                                        <div class="dd" id="nestable2">
											<ol class="dd-list">
<!--{loop $companys $k $v}-->
												<li class="dd-item dd2-item" data-id="{$v['id']}">
													<div class="dd-handle dd2-handle"><i class="normal-icon icon-group pink bigger-130"></i></div>
													<div class="dd2-content">{$v['name']}</div>
													<ol class="dd-list">
<!--{loop $v['sub_department'] $tk $tv}-->
														<li class="dd-item item-orange" data-id="{$tv['id']}">
															<div class="dd-handle">
                                                            {$tv['name']}<div class="easy-pie-chart percentage" data-percent="{$tv['percent']}" data-color="#87B87F" data-rel="tooltip" title="{$tv['percent']}%"></div>
															</div>
															<ol class="dd-list">
<!--{loop $tv['users'] $uk $uv}-->
                                                                <li class="dd-item" data-id="{$uv['id']}">
                                                                	<div class="dd-handle"><img src="${avatar($uv['avatar'])}" width="20" />${heivrid($uv)}</div>
                                                                </li>
<!--{/loop}-->
															</ol>
														</li>
<!--{/loop}-->
													</ol>
												</li>
<!--{/loop}-->
											</ol>
										</div>
									</div>

									<div class="col-xs-12 hide">
										<div class="table-responsive">
											<table id="sample-table-1" class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														<th class="center">
															<label>
																<input type="checkbox" class="ace" />
																<span class="lbl"></span>
															</label>
														</th>
														<th>id</th>
														<th>任务</th>
														<th>所属项目</th>
														<th>参与人数</th>
														<th class="hidden-480">创建时间</th>
														<th class="hidden-480">结束时间</th>
														<th>创建人</th>
														<th>操作</th>
													</tr>
												</thead>

												<tbody>
					<!--{loop $tasks $index $one}-->
													<tr>
														<td class="center">
															<label>
																<input type="checkbox" class="ace" /><span class="lbl"></span>
															</label>
														</td>

														<td>{$one['id']}</td>
														<td>
                                                        	{$one['name']}
                                                            <div class="easy-pie-chart percentage" data-percent="{$one['percent']}" data-color="#87B87F" data-rel="tooltip" title="{$one['percent']}%"></div>
                                                        </td>
														<td>{$teams[$one['teamid']]['name']}</td>
														<td>${intval($counts['members'][$one['id']])}</td>
														<td class="hidden-480">${date('Y-m-d H:i', $one['create_time'])}</td>
														<td class="hidden-480">${$one['close_time'] ? date('Y-m-d H:i', $one['close_time']) : '未结束'}</td>
														<td>${$admincp->admins[$one['adminid']]['realname'] ? $admincp->admins[$one['adminid']]['realname'] : $admincp->admins[$one['adminid']]['username']}</td>
														<td>
															<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
																<a class="btn btn-xs btn-info" href="?action=team&operation=edit&detail=yes&id={$one['id']}">
																	<i class="icon-zoom-in bigger-120"></i>
																</a>
																<a class="btn btn-xs btn-info" href="?action=team&operation=edit&id={$one['id']}">
																	<i class="icon-edit bigger-120"></i>
																</a>
																<a class="btn btn-xs btn-danger ajaxlink" href="?action=team&operation=edit&id={$one['id']}" ask="您确定要删除此客户？"><i class="icon-trash bigger-120"></i></a>
															</div>

															<div class="visible-xs visible-sm hidden-md hidden-lg">
																<div class="inline position-relative">
																	<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
																		<i class="icon-cog icon-only bigger-110"></i>
																	</button>

																	<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																		<li>
																			<a href="#" class="tooltip-info" data-rel="tooltip" title="详情">
																				<span class="blue">
																					<i class="icon-zoom-in bigger-120"></i>
																				</span>
																			</a>
																		</li>

																		<li>
																			<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
																				<span class="green">
																					<i class="icon-edit bigger-120"></i>
																				</span>
																			</a>
																		</li>

																		<li>
																			<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																				<span class="red">
																					<i class="icon-trash bigger-120"></i>
																				</span>
																			</a>
																		</li>
																	</ul>
																</div>
															</div>
														</td>
													</tr>
<!--{/loop}-->
												</tbody>
											</table>
										</div><!-- /.table-responsive -->
									</div><!-- /span -->
								</div><!-- /row -->

								<div class="hr hr-18 dotted hr-double"></div>
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
		<!-- page specific plugin scripts -->
<!--{include admin_footer}-->
		<script src="/static/ace/assets/js/jquery-ui-1.10.3.full.min.js"></script>

		<script src="/static/ace/assets/js/jquery.dataTables.min.js"></script>
		<script src="/static/ace/assets/js/jquery.dataTables.bootstrap.js"></script>
		<script src="/static/ace/assets/js/jquery.easy-pie-chart.min.js"></script>
		<script src="/static/ace/assets/js/jquery.nestable.min.js"></script>

		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			jQuery(function($) {
				/*
				$('#nestable').nestable({
					group : 1
				}).on('change', updateOutput);
				$('#nestable2').nestable({
					group : 1
				}).on('change', updateOutput);
				*/
				var oldie = /msie\s*(8|7|6)/.test(navigator.userAgent.toLowerCase());
				$('.easy-pie-chart.percentage').each(function(){
					$(this).easyPieChart({
						barColor: $(this).data('color'),
						trackColor: '#EEEEEE',
						scaleColor: false,
						lineCap: 'butt',
						lineWidth: 8,
						animate: oldie ? false : 1000,
						size:20
					}).css('color', $(this).data('color'));
				});
				$('[data-rel=tooltip]').tooltip();
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			})
		</script>
</body>
</html>